set_project("block-server")
set_languages("c++20")
set_version("0.0.1", {build = "%Y%m%d"})
add_rules("plugin.compile_commands.autoupdate", {outputdir = "build"})

package("xtp")
    set_license("Apache-2.0")

    on_load(function (package)
        package:set("installdir", path.join(os.scriptdir(), "third_party", "xtp"))
    end)

    on_fetch(function (package)
        local result = {}
        package:addenv("LD_LIBRARY_PATH", package:installdir("api"))
        result.linkdirs = package:installdir("api")

        result.links = {"xtptraderapi", "xtpquoteapi"}
        result.includedirs = package:installdir("api")
        return result
    end)
package_end()

add_requires("xtp")
add_requires("rapidjson")

includes("src")
